package com.shopping.mall.base.http;

public enum ResponseState {
    SUCCESS("operate successfully", 200),//操作成功
    TOKEN_NOT_PROVIDE("Not the incoming token", 101),//未传入token
    TOKEN_IS_ERROR("Token error", 102),//token错误
    TOKEN_IS_EXPIRED("Token expired", 103),//token已过期
    REFRESH_TOKEN_IS_ERROR("RefreshToken error", 104),//refreshToken错误
    REFRESH_TOKEN_IS_EXPIRED("RefreshToken expired", 105),//refreshToken已过期
    USER_NOT_EXIST("The user does not exist", 106),//用户不存在
    PASSWORD_IS_ERROR("wrong password", 107),//密码错误
    PHONE_IS_EXIST("The mobile phone number has been bound", 108),//该手机号已被绑定
    CODE_NOT_EXIST("The verification code is not obtained or has expired", 109),//验证码未获取或已过期
    CODE_IS_ERROR("Verification code error", 110),//验证码错误
    PARAM_IS_ERROR("parameter error", 111),//参数错误
    FILE_FORMAT_ERROR("File format error", 112),//文件格式错误
    NOT_CAN_GET_FILE_STREAM("Failed to obtain the file stream.", 113),//获取文件流失败
    ACCOUNT_IS_ILLEGAL("The account is suspected of violation", 114),//该账号涉嫌违规
    OPERATION_HAI_FINISH("This operation is complete. Do not repeat this operation", 116),//该操作已经完成，请勿重复操作
    WITHOUT_PERMISSION("The user does not have the permission", 117),//该用户无此权限
    SOME_INFORMATION_INSERT_ERROR("Some information failed to be inserted.", 118),//部分信息插入失败
    EXCEL_IS_ERROR("There is no data in this EXCEL  ", 119),//该EXCEL里没有数据
    USER_IS_NORMAL("The user status is normal and has not been banned", 120),//该用户状态正常，未被封禁
    APPLY_NOT_EXIST("Failure to submit an application", 122),//未提交申请
    USERNAME_IS_EXIST("The user name already exists", 123),//该用户名已存在
    TARGET_NOT_EXIST("The target does not exist",124),//该目标不存在
    MAIL_IS_EXIST("The email address is registered",125),//该邮箱已注册
    PARENT_NOT_EXIST("The parent node does not exist",126),//父节点不存在
    HAS_CHILDREN("Child nodes exist and cannot be deleted",127),//存在子节点，无法删除
    SPECIFICATION_NOT_EXIST("The specifications do not exist",128),//规格信息不存在
    GOODS_IS_NULL("Goods cannot be empty",129),//商品不能为空
    ORDER_NOT_EXIST("Order does not exist",130),//订单不存在
    ORDER_NOT_MATCH("This operation cannot be performed on this order",131),//该订单无法进行该操作
    PAY_ERROR("payment failure",132),//支付失败
    REFUND_ERROR("Refund failure",133),//退款失败
    DATA_IS_EXIST("The data already exists",134),//该数据已存在
    GOOD_NOT_EXIST("The item does not exist",135),//该商品不存在
    STOCK_NOT_ENOUGH("inventory shortage",136),//库存不足
    OVER_MAX_NUMBER("The maximum purchase limit is exceeded",137),//超过最大购买限制

    ERROR("operation failure", 500);//操作失败

    private final String message;
    private final int value;

    ResponseState(String message, int value) {
        this.message = message;
        this.value = value;
    }

    public String getMessage() {
        return message;
    }

    public int getValue() {
        return value;
    }
}
